extends Node2D


@export var itemsInfoGroupId:String = "1"

func _physics_process(delta):
	z_index = position.y


func interact():
	#GlobalData.onGetItem(itemType, itemId, count)
	var itemsInfoConfig = ConfigClasses.CollectableItemInfoConfig.groupConfigArrDict[itemsInfoGroupId]
	for itemInfoConfig in itemsInfoConfig:
		GlobalData.onGetItem(itemInfoConfig.itemType, itemInfoConfig.itemId, int(itemInfoConfig.count))
	queue_free()
